<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>__set_state 处理程序</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="datetime.modify.html">« DateTime::modify</a></li>
      <li style="float: right;"><a href="datetime.setdate.html">DateTime::setDate »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.datetime.html">DateTime</a></li>
    <li>__set_state 处理程序</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="datetime.set-state" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DateTime::__set_state</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">DateTime::__set_state</span> &mdash; <span class="dc-title">__set_state 处理程序</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-datetime.set-state-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>DateTime::__set_state</strong></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$array</code></span>): <span class="type"><a href="class.datetime.html" class="type DateTime">DateTime</a></span></div>

  <p class="para rdfs-comment">
   <a href="language.oop5.magic.html#object.set-state" class="link">__set_state()</a> 处理程序。
  </p>
  <p class="para">
   跟 <span class="methodname"><a href="datetimeimmutable.set-state.html" class="methodname">DateTimeImmutable::__set_state()</a></span> 一样，但适用于
   <span class="classname"><a href="class.datetime.html" class="classname">DateTime</a></span>。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-datetime.set-state-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">array</code></dt>

    <dd>

     <p class="para">
      数组初始化。
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-datetime.set-state-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回 DateTime 对象实例。
  </p>
 </div>


</div></div></div></body></html>